#!/usr/bin/env python
#coding=utf-8
__author__ = 'revol'

import unittest

from log2mongo import MongodbHandler
from log2mongo import Levels

class TestMongodbHandler(unittest.TestCase):
    def setUp(self):
        self.handler = MongodbHandler({'host':'192.168.1.121',
                                       'port':27017,
                                       'username':'test',
                                       'password':'123',
                                       'database':'test',
                                       'collection':'log'})

    def test_emit(self):
        self.handler.emit({'a':1,'b':2},Levels.CACHE)
        # self.assertEqual()